# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=postfix-stats
pkgver=1.6
pkgrel=1
pkgdesc="Retrieve stats from postfix"
url="https://github.com/fcolista/postfix-stats"
arch="all !x86"
license="MIT GPL-2.0"
depends="perl"
subpackages="$pkgname-doc"
makedepends="db-dev perl-file-tail perl-apache-session perl-db_file"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcolista/postfix-stats/archive/refs/tags/$pkgver.tar.gz
README.alpine"
options="!check"

build() {
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm755 update-mailstats.pl "$pkgdir"/usr/bin/update-mailstats.pl
	install -Dm 644 "$srcdir"/README.alpine -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
c833addfa54d8e204c2b784f00d01bbc01bbada7b762f71ad37534f6913328c88b6da8b42e351bae688060df6672482cf257e86108fc85cc4e3779180ec985de  postfix-stats-1.6.tar.gz
df42aaf1ac2c1704116cfff3474479b4b27f00c94269b19fea4214667220aa87d4950e56164375b56781394496739d10863c67b3a2791a0459993b126363ac31  README.alpine
"
